package com.java.awt.observer;

import java.util.ArrayList;
import java.util.List;

//具体主题角色 Frame
public class ConcreteWatched implements Watched{
	
	private List<Watcher> list = new ArrayList<Watcher>();
	
	public void add(Watcher watcher) {
		list.add(watcher);
	}
	public void remove(Watcher watcher) {
		list.remove(watcher);
	}
	public void notify(String str) {
		for(Watcher watcher:list){
			watcher.update(str);
		}
	}

}
